import { Button } from 'antd-mobile'
import React from 'react'
import { useNavigate } from 'react-router-dom'

function Index() {
  //退出登录
  const navigate=useNavigate()
  const goOut=()=>{
     localStorage.clear()
     navigate('/login')
  }
  return (
    <div style={{width:'100vw',height:'100vh'}}>
      
         <h3>
          
            
             用户名:{ localStorage.getItem('name')
             
             }
             <img src={localStorage.getItem('avator')} alt=""  style={{width:'50px',height:'50px',borderRadius:'50%'}}/>
            <Button onClick={goOut}>退出</Button>
         </h3>
      
    </div>
  )
}

export default Index
